<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
 <title></title>
 <link rel="stylesheet" type="text/css" href="/assets/css/bootstrap.min.css">
 <link rel="stylesheet" type="text/css" href="/assets/fonts/line-icons.css">
 <link href="/assets/plugins/datatables/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" />
 <link href="/assets/plugins/datatables/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css" />
 <link href="/assets/plugins/datatables/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css" />
 <link rel="stylesheet" type="text/css" href="/assets/css/main.css">
 <link rel="stylesheet" type="text/css" href="/assets/css/responsive.css">
</head>
<body>
<div class="header-container">
 <h4 class="card-title">影片选择</h4>
<div class="card-body">
 <div class="table-responsive">
  <table id="datatable" class="table table-bordered">
   <thead>
   <tr>
    <th>电影编号</th>
    <th>电影名称</th>
    <th>导演</th>
    <th>主要演员</th>
    <th>电影简介</th>>
    <th>地区</th>
    <th>语言</th>
    <th>选择</th>
   </tr>
   </thead>
   <tbody>
   <tr th:each="t,line : ${ movies }">
    <td th:text="${ t.id }"></td>
    <td th:text="${ t.getMovieName() }"></td>
    <td th:text="${ t.director }"></td>
    <td th:text="${ t.getPerformer() }"></td>
    <td th:text="${ t.getBrief() }"></td>
    <td th:text="${t.getRegion() }"></td>
    <td th:text="${t.getLanguage() }"></td>
    <td th:id="${t.id}">
     <a class="buyTicket" href="javascript:void (0)">选购</a>
    </td>
   </tr>

   </tbody>
  </table>
 </div>
</div>

<script type="text/javascript" th:inline="javascript">

 // 选购
 $(".buyTicket").bind("click",function () {
  var id = $(this).parent().attr("id");
  alert(id);
  toJump("/buy/select","id="+id)
 })


</script>


<script src="/assets/js/jquery-min.js"></script>
<script src="/assets/js/popper.min.js"></script>
<script src="/assets/js/bootstrap.min.js"></script>
<script src="/assets/js/jquery.app.js"></script>
<script src="/assets/js/main.js"></script>
<script src="/assets/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="/assets/plugins/datatables/dataTables.bootstrap4.min.js"></script>
<script src="/assets/plugins/datatables/dataTables.buttons.min.js"></script>
<script src="/assets/plugins/datatables/buttons.bootstrap4.min.js"></script>
<script src="/assets/plugins/datatables/jszip.min.js"></script>
<script src="/assets/plugins/datatables/pdfmake.min.js"></script>
<script src="/assets/plugins/datatables/vfs_fonts.js"></script>
<script src="/assets/plugins/datatables/buttons.html5.min.js"></script>
<script src="/assets/plugins/datatables/buttons.print.min.js"></script>
<script src="/assets/plugins/datatables/buttons.colVis.min.js"></script>
<script src="/assets/plugins/datatables/dataTables.responsive.min.js"></script>
<script src="/assets/plugins/datatables/responsive.bootstrap4.min.js"></script>
</body>
</html>